package com.zpark.service.impl;

import com.zpark.service.IUserService;
import com.zpark.mapper.IUserMapper;
import com.zpark.pojo.Empty;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
@Service
public class UserServiceImpl implements IUserService {

    @Autowired
    private IUserMapper UserMapper;


    @Override
    public Integer addEmpty(Empty empty) {
        return UserMapper.insertEmpty(empty);
    }

    @Override
    public Integer removeEmptyById(Integer id) {
        return UserMapper.deleteEmptyById(id);
    }

    @Override
    public Integer changeEmptyById(Empty empty) {
        return UserMapper.updateEmptyById(empty);
    }

    @Override
    public List<Empty> findAllEmpty() {
        return UserMapper.selectAllEmpty();
    }

    @Override
    public List<Empty> findByName(String username) {
        return UserMapper.selectByName(username);
    }
}
